import actions from './actions'
import getters from './getters'
import mutations from './mutations'

const state = {
	financeTab: 'all',
	params: {
		type: 'income'
	},
	payments: [],
	financePage: {},
	finance_list: [
		{ id: 'finance1', text: '账户资金', index: 'account_price', visibled: true },
		{ id: 'finance2', text: '发票记录', index: 'invoice', visibled: false },
	],
	finance_role: {
		'manager': [0, 1],
		"finance": [0, 1]
	},
	finance_tabs: [],
	financeVisi: true
}
const payments = {
	getters,
	state,
	actions,
	mutations
}
if(module.hot) {
	module.hot.accept([
		'./actions',
		'./getters',
		'./mutations'
	], () => {
		payments.hotUpdate({
			actions: require('./actions'),
			getters: require('./getters'),
			mutations: require('./mutations'),
		})
	})
}

export default payments